import { createRouter, createWebHistory } from 'vue-router'

import {
  ClockCircleOutlined,
  AntCloudOutlined,
  BarsOutlined,
  DeleteOutlined,
  CommentOutlined,
  CopyOutlined,
} from '@ant-design/icons-vue'
const menuRoutes = [
  {
    path: '/home/movies',
    name: '影视',
    component: () => import('../views/Movies/index.vue'),
    meta: {
      icon: AntCloudOutlined,
    },
  },
  {
    path: '/home/movie/detail',
    name: '电影详情',
    component: () => import('../views/Movies/MoviesDetails.vue'),
    meta: {
      icon: AntCloudOutlined,
    },
  },
  {
    path: '/home/tv',
    name: 'TV',
    component: () => import('../views/TvShow/index.vue'),
    meta: {
      icon: AntCloudOutlined,
    },
  },
  {
    path: '/home/tv/detail',
    name: 'TV详情',
    component: () => import('../views/TvShow/TvDetails.vue'),
    meta: {
      icon: AntCloudOutlined,
    },
  },
  {
    path: '/home/tv/play',
    name: 'Play',
    component: () => import('../views/Player/index.vue'),
    meta: {
      icon: AntCloudOutlined,
    },
  },
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home',
    },

    {
      path: '/home',
      name: 'home',
      redirect: '/home/movies',
      component: () => import('../views/Layout/index.vue'),
      children: menuRoutes,
    },
  ],
})

export default router
export { menuRoutes }
